﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Pikapika
{
    public static class StringExtensions
    {
        public static string AutoEllipsis(this string s, int maxLength)
        {
            s = s ?? string.Empty;
            return s.Length > maxLength ? s.Substring(0, maxLength) + "..." : s;
        }
    }
}